home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 89 / maccd 89.iso / utilities / Mac OS X / ProcessWizard.dmg / ProcessWizard / ProcessWizard Daemon.app / Contents / Resources / kill.pl < prev    next >
Encoding:
Perl Script  |  2002-01-24  |  311 b   |  18 lines

  1. #!/usr/bin/perl
  2. # USAGE : kill.pl <pid> 
  3.  
  4. #($tmppath = $ARGV[0]) =~ s/(\&|'|")/\\\1/g; # escape &, ' and " chars with \
  5.  
  6. $pid = $ARGV[0];
  7.  
  8. open SHELL2, "kill -9 $pid |" or die "probleme";
  9.  
  10. # STDOUT: 
  11. # ou
  12. # STDERR: <pid>: Operation not permitted denied
  13. #       ou: <pid>: No such process
  14.  
  15. close SHELL2;
  16.  
  17. print ;